[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
V_USE() Opens a file on a local area network
Description:
Opens a specified database file in the currently selected work area or
notifies the user if unsuccessful. The file can have an ALIAS
specified as well as EXCLUSIVE use set on or off.
Syntax:
V_USE( <expC1>, <expL> [, <expC2>] )
Pass:
<expC1> = Name of database to open
<expL> = .T. to open file exclusively
.F. to open file in shared mode
<expC2> = Optional: ALIAS name to assign to the database
Return:
<expL> = .T. if successful, otherwise .F.
Notes:
Example:
DO WHILE whatever
IF .NOT. V_USE("testfile",.F.)
ac_msg[1] = "Unable to open file"
ac_msg[2] = "Operation aborted"
DISPMSG(ac_msg,2,"","")
INKEY(5)
EXIT
ENDIF
.
.
.
ENDDO
.
.
.
Usage:
V_USE() will attempt to open the specified database file in the mode
in the specified mode. If it is unsuccessful, a non-screen
destructive message stating, "Waiting for busy network. Press any key
to abort." will appear on the screen and V_USE() will continue
attempting to open the file in the mode specified. If the user aborts
the operation by pressing a key, V_USE() will return a logical value
of false. If V_USE() returns a value of false, it is your job as the
programmer to abort the operation and recover properly.
See Also:
FAKELOCK
V_APPEND()
V_FLOCK()
V_RLOCK()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson